const initState = {
    ballX: 0,
    ballY: 0,
    ballWidth: 24,
    ballHeight: 24
}
export default function (state=initState,action) {
    switch(action.type) {
        case 'ballMove':
            const ballX = action.ballX
            const ballY = action.ballY
            return {
                ballX,
                ballY
            }
            case 'resetPosition':
                return {
                    ballX: 0,
                    ballY: 0
                }
            default:
                return state
    }
}